import 'dart:math';

import 'package:flutter/material.dart';
import 'package:flutter_food/core/ext/int_extension.dart';

class IconText extends StatelessWidget {
  final Widget _icon;
  final String _title;
  final Color color;

  IconText(this._icon, this._title, {this.color});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.symmetric(vertical: 16.px),
      alignment: Alignment.center,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          _icon,
          SizedBox(
            width: 3.px,
          ),
          Text(
            _title,
            style: TextStyle(fontSize: 16, color: color),
          )
        ],
      ),
    );
  }
}
